﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RentHouse.Common;
using RentHouse.DTO;

namespace RentHouse.IService
{
   public interface IHouseService:IServiceSupport
    {   
        /// <summary>
        /// 房源信息展示，根据房源类型显示对应信息
        /// </summary>
        /// <param name="start"></param>
        /// <param name="length"></param>
        /// <param name="communityName"></param>
        /// <param name="typeId"></param>
        /// <param name="rowCount"></param>
        /// <returns></returns>
        List<HouseDTO> GetList(int start, int length, string communityName, int typeId, ref int rowCount);
        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="picDTO"></param>
        /// <returns></returns>
        AjaxResult AddHousePic(HousePicDTO picDTO);
        /// <summary>
        /// 查看该房源已经上传的图片
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<HousePicDTO> GetPicList(int id);

        /// <summary>
        /// 获取房子的配套设施
        /// </summary>
        /// <returns></returns>
        List<AttachmentDTO> GetAttachmentList();

        /// <summary>
        /// 添加房源
        /// </summary>
        /// <returns></returns>
        AjaxResult AddHouse(HouseAddDTO addDTO);

        /// <summary>
        /// 获取要修改的房源信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        HouseEditDTO GetHouseInfo(long id);

        /// <summary>
        /// 修改房源信息
        /// </summary>
        /// <param name="editDTO"></param>
        /// <returns></returns>
        AjaxResult Update(HouseEditDTO editDTO);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AjaxResult Delete(long id);

        ///
        List<HouseDTO> GetList(int pageIndex, int cityId,int pageSize);

        /// <summary>
        /// 移动端房源详情页面信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        HouseDetailDTO GetHouseDetail(int id);


        /// <summary>
        /// 获取所有房源信息的集合
        /// </summary>
        /// <returns></returns>
        List<HouseDetailDTO> GetDetailDTOList();

        /// <summary>
        /// 移动端搜索页面
        /// </summary>
        /// <param name="houseSearch"></param>
        /// <returns></returns>
        List<HouseDTO> GetListBySearch(HouseSearchOptions houseSearch);
    }
}
